<template>
	<div>
	  <van-popup
	  	  id="more"
		  v-model="showMore"		  
		  position="bottom"
	  >		  
	    <div class="moreShareWrap">
	    	<div class="item" @click="shareWx">
 				<img src="../../static/img/lanhu/15.png" alt="" class="img"/>
 				<span class="word">微信</span>
	    	</div>
	    	<div class="item" @click="shareWxFriend">
 				<img src="../../static/img/lanhu/61.png" alt="" class="img"/>
 				<span class="word">朋友圈</span>
	    	</div>
	    	<div class="item" @click="shareCircle">
 				<img src="../../static/img/lanhu/62.png" alt="" class="img"/>
 				<span class="word">圈子</span>
	    	</div>	    	
	    </div>
	    
	    
	    <div class="moreShareWrap">
	    	<!--<div class="item">
 				<img src="../../static/img/lanhu/20.png" alt="" class="img"/>
 				<span class="word">复制</span>
	    	</div>-->
	    	<div class="item">
 				<img src="../../static/img/lanhu/19.png" alt="" class="img" @click="showCode"/>
 				<span class="word">二维码</span>
	    	</div>	    	
	    </div>	  
	    <div class="cancle" @click="showMore=false">取消</div>
	  </van-popup>
	  
	  
      <floor45 ref="floor45" :img="data.goodsImage" :name="data.comDesc"></floor45>
	    
	    
	</div>	
</template>

<script>
import Floor45 from '_c/market/floor/floor45.vue'	
import {apiUrl} from '@/api/publicFun.js'
import {getFun} from '@/api/publicFun.js'	 
let publicFun=getFun()
let api=apiUrl()
export default {	
	components: {
	     Floor45
	},		
	data() {
       return {
          showMore:false,
          comId:'',
          userId:'',
       }
	},
	props:['data'],
	mixins:[publicFun],//混入
	methods: {	
	   showCode(){
	   	 this.showMore=false
	   	 this.$refs.floor45.showCodeMask()
	   },
       show(){
         this.showMore=true
       },
       showMoney(){
       	 this.showMore=false
       	 this.$emit('showMoneyPopup')
       },
       shareWx(){
       	    let time=new Date().getTime()
            let shareTitle=this.data.comDesc
            let shareUrl=api+'/market/goods/shareDetail'+'?t='+time+'&userId='+this.userId+'&comId='+this.comId
            let sharePic=this.data.goodsImage
            let shareDesc=shareTitle.substring(0,20)+',快来集市抢货吧。'+shareUrl       	      	    
       	    this.appShareWx(shareTitle,shareUrl,sharePic,shareDesc)    
       },
       shareWxFriend(){
       	    let time=new Date().getTime()
            let shareTitle=this.data.comDesc
            let shareUrl=api+'/market/goods/shareDetail'+'?t='+time+'&userId='+this.userId+'&comId='+this.comId
            let sharePic=this.data.goodsImage
            let shareDesc=shareTitle.substring(0,20)+',快来集市抢货吧。'+shareUrl       	      	    
       	    this.appShareWxFriend(shareTitle,shareUrl,sharePic,shareDesc)         	
       },
       shareCircle(){
       	    let time=new Date().getTime()
       	    let shareTitle=this.data.comDesc
       	    let shareUrl=api+'/market/goods/detail'+'?t='+time+'&comId='+this.comId+'&userId='+this.userId
       	    let sharePic=this.data.goodsImage
       	    let shareDesc=shareTitle.substring(0,20)+',快来集市抢货吧。'+shareUrl
       	    this.appShareCircle(shareTitle,shareUrl,sharePic,shareDesc)
       },
       copy(){
       	 this.getCopy()
       	 this.showMore=false
       }       
	},
	mounted() {
		this.comId=this.$router.currentRoute.query.comId;
		this.userId=this.$router.currentRoute.query.userId;		
	}
}	
</script>

<style scoped="" lang="scss">
#more{ .cancle{padding: 12px 0;font-size: 16px;background: #fff;text-align: center;margin-top: 20px;}}
.moreShareWrap{padding: 20px 15px 0;display: flex;
     .item{display: flex;flex-direction: column;margin-right: 10px;}
     .word{color: #333;margin-top: 8px;opacity: 0.8;text-align: center;}
     .img{width: 42px;height: 42px;}    
}
.van-popup{background: rgba(255,255,255,0.8);}
</style>